﻿using EPE.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace EPE.WPF
{
    /// <summary>
    /// UCHouseProjectList.xaml 的交互逻辑
    /// </summary>
    public partial class UCHouseProjectList : UserControl
    {
        public UCHouseProjectList()
        {
            InitializeComponent();
        }

        CLoginUser userinfo = new CLoginUser();
        public UCHouseProjectList(CLoginUser pargUserinfo)
        {
            InitializeComponent();
            userinfo = pargUserinfo;
            
        }

        private void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            //var drv = (DataRowView)this.dgDepartment.SelectedItem;

            //int iId = Convert.ToInt32(drv["Id"]);
            //DepartmentInfoEditForm die = new DepartmentInfoEditForm();
            //die.ShowInfo(iId);
            //die.ShowDialog();
            //BindData();

        }

        private void btnDel_Click(object sender, RoutedEventArgs e)
        {
            //if (MessageBoxResult.OK == MessageBox.Show("是否删除数据！", "系统信息", MessageBoxButton.OKCancel, MessageBoxImage.Question))
            //{
            //    string idlist = "";

            //    var drv = (System.Data.DataRowView)this.dgCard.SelectedItem;
            //    idlist = drv["Id"].ToString();

            //    //VMS.BLL.tbl_departmentinfo bll = new VMS.BLL.tbl_departmentinfo();
            //    //bll.DeleteList(idlist);
            //    //BindData();
            //}

        }

        private void btnSearch_Click(object sender, RoutedEventArgs e)
        {

        }

        private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            HouseProjectAddForm frmPj = new HouseProjectAddForm();
            frmPj.ShowDialog();
        }
    }
}
